/**
 * 
 */
package org.t2.backstage.foundation.starting;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.Configuration;

/**
 * @author YY
 *
 */
@Configuration
public class ApplicationSettings {


	//#后台服务器的tomcat端口
	@Value("${server.port:9011}")
	protected int serverPort;
	//#服务器是否调试模式
	@Value("${server.debug.mode:true}")
	protected boolean serverDebugMode;
	//#是否为后台主服务器
	@Value("${server.backstage.main:true}")
	protected boolean serverBackstageMain;
	//#热更配置文件夹
	@Value("${fix.upload.design.folder:/uploadfiles/design/}")
	protected String fixUploadDesignFolder;
	//#热更代码文件夹
	@Value("${fix.upload.clazzs.folder:/uploadfiles/clazzs/}")
	protected String fixUploadClazzsFolder;
	//#后台加密秘钥
	@Value("${backstage.key:zhaizi_t2_2024}")
	protected String backstageKey;
	//#主后台的地址
	@Value("${backstage.main.url:http://127.0.0.1:9001}")
	protected String backstageMainUrl;
	//#日志输出格式配置
	@Value("${logging.config:file:./config/log4j2.xml}")
	protected String loggingConfig;
	//#数据库配置
	@Value("${database.config.file:file:./config/database.db}")
	protected String databaseConfigFile;
	//#===================redis基础配置===================
	@Value("${spring.data.redis.database:5}")
	protected int springDataRedisDatabase;
	@Value("${spring.data.redis.host:127.0.0.1}")
	protected String springDataRedisHost;
	@Value("${spring.data.redis.password:yy2024}")
	protected String springDataRedisPassword;
	@Value("${spring.data.redis.port:6379}")
	protected int springDataRedisPort;
	//# 连接超时时间 单位 ms（毫秒）
	@Value("${spring.data.redis.timeout:3000}")
	protected int springDataRedisTimeout;


	public int getServerPort() {
		return serverPort;
	}
	public boolean isServerDebugMode() {
		return serverDebugMode;
	}
	public boolean isServerBackstageMain() {
		return serverBackstageMain;
	}
	public String getDatabaseConfigFile() {
		return databaseConfigFile;
	}
	public String getLoggingConfig() {
		return loggingConfig;
	}
	public String getFixUploadDesignFolder() {
		return fixUploadDesignFolder;
	}
	public String getFixUploadClazzsFolder() {
		return fixUploadClazzsFolder;
	}
	public String getBackstageKey() {
		return backstageKey;
	}
	public String getBackstageMainUrl() {
		return backstageMainUrl;
	}
}
